import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { RoleEnum } from '/@/enums/roleEnum';
import { t } from '/@/hooks/web/useI18n';

const dashboard: AppRouteModule = {
  path: '/system',
  name: 'System',
  component: LAYOUT,
  redirect: '/system/index',
  meta: {
    icon: 'ant-design:setting-outlined',
    title: t('系统管理'),
    orderNo: 50,
    roles: [RoleEnum.SUPER],
  },
  children: [
    {
      path: 'middleUser',
      name: 'MiddleUser',
      component: () => import('/@/views/system/middleUser/index.vue'),
      meta: {
        title: t('中台用户管理'),
        icon: 'ant-design:user-outlined',
        orderNo: 1,
        roles: [RoleEnum.SUPER],
      },
    },
    {
      path: 'businessUser',
      name: 'BusinessUser',
      component: () => import('/@/views/system/businessUser/index.vue'),
      meta: {
        title: t('B端用户管理'),
        icon: 'ant-design:user-outlined',
        orderNo: 5,
        roles: [RoleEnum.SUPER],
      },
    },
  ],
};

export default dashboard;
